import React from 'react'
import {Row,Col,Input} from "antd";
import { Table, Tag } from 'antd';
import axios from "axios";
// import { AudioOutlined } from '@ant-design/icons';
const { Search } = Input;
const columns = [
    {
        title: 'Full Name',
        width: 100,
        dataIndex: 'name',
        key: 'name',
        fixed: 'left',
        className:'first'
    },
    {
        title: 'Age',
        width: 100,
        dataIndex: 'age',
        key: 'age',
        fixed: 'left',
        className:'first'
    },
    { title: 'Column 1', dataIndex: 'address', key: '1',  className:'first' },
    { title: 'Column 2', dataIndex: 'address', key: '2',  className:'first' },
    { title: 'Column 3', dataIndex: 'address', key: '3' ,  className:'first'},
    { title: 'Column 4', dataIndex: 'address', key: '4',  className:'first' },
    { title: 'Column 5', dataIndex: 'address', key: '5',  className:'first' },
    { title: 'Column 6', dataIndex: 'address', key: '6' ,  className:'first'},
    { title: 'Column 7', dataIndex: 'address', key: '7',  className:'first' },
    { title: 'Column 8', dataIndex: 'address', key: '8',  className:'first' },
    {
        title: 'Action',
        className:'first',
        key: 'operation',
        fixed: 'right',
        width: 100,
        render: () => <a>action</a>,
    },
];
const data = [
    {
        key: '1',
        name: 'John Brown',
        age: 32,
        address: 'New York Park',
    },
    {
        key: '2',
        name: 'Jim Green',
        age: 40,
        address: 'London Park',
    },
];
function Seek(value) {
    console.log(value)
    axios({
        url:'opportunity/queryOpportunityByCondition',
        method:'post',
        data:{
            "currentPage": 1,
            "inputValue": "小",
            "perSize": 3,
        }
    }).then(res=>{
        console.log(res)
    })
}
class Business extends React.Component {
    render() {
        return (
            <div>
                <Row style={{paddingBottom:'30px'}}>
                    <Col> <Search placeholder="请输入客户名称" onSearch={Seek} style={{ width: 400 }}/></Col>
                </Row>
                <Row>
                    <Table style={{width:'100%'}} columns={columns} dataSource={data} scroll={{ x: 1300 }} />
                </Row>
            </div>
        )
    }
    componentDidMount() {
        axios({
            url:'opportunity/queryOpportunityByPage',
            method:'post',
            data:{
                "currentPage": 1,
                "perSize": 3,
            }
        }).then(res=>{
                console.log(res)
            }
        )
    }
}

export default Business